﻿@using CoreData
@model List<Banner_Logo>
<div id="mainSlideshow" class="belloSlideShow">
    @if (Model != null && Model.Count() > 0)
    {
        <div class="slide-block-image">
            <ul>
                @foreach (var item in Model)
                {
                    <li class="item">
            		    <div class="container carousel-caption">
            			    <div class="row">
		            		    <div class="col-md-6 col-sm-12 col-xs-16">
		            			    <h1>@item.Name</h1>
		            			    <p class="hidden-xs">@item.Note</p>
		            			    <a href="@item.Link" target="_blank" class="btn">Xem tiếp »</a>
		            		    </div>
	            		    </div>
	            	    </div>
            		    <a class="banner-link" href="@item.Link" target="_blank"><img src="/Media/BannerLogo/@item.Image"></a>
            	    </li>
                }
            </ul>
        </div>
        <div class="slide-block-nav">
            <ul>
                @foreach (var item in Model)
                {
                    <li><a href="@item.Link" target="_blank" title="@item.Name">
                        <div class="slide-nav-image">
                            <img src="/Media/BannerLogo/@item.Image" alt="@item.Image" />
                        </div>
                        <div class="slide-nav-content">
                            @{
                    var Name = item.Name;
                    var Description = item.Note;
                    if (Name.Length > 20)
                    {
                        Name = Name.Substring(0, 17) + "...";
                    }
                    if (Description.Length > 60)
                    {
                        Description = Description.Substring(0, 57) + "...";
                    }
                                <div class="inner-slide-nav-content">
                                    <p>
                                        @Name</p>
                                    <span>@Description</span>
                                </div>
                            }
                        </div>
                    </a></li>
                }
            </ul>
        </div>
    }
</div>
